<%@ page language="java" import="com.myself.model.Count" import="java.util.List"
contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生基本信息</title>

<style>
	
		.myLongDiv
	    {
	      top:65%;
	      left:55%;
	      position:absolute;   
	      margin:-250px 0 0 -200px;
	      font-size:20px;
	    }  			
			
</style>

</head>

<body>

<div align="center">
	<div id="background" style="position:absolute;z-index:-1;width:100%;height:100%;top:0px;left:0px;">
	<img src="/images/q.jpg" width="100%" height="100%"/>
    </div>
    
<div class="myLongDiv" >
	<table border="1">
	
<tr>
	<td>年龄大小</td>
	<td>人数</td>
	<td>占总人数的百分率</td>
</tr>

	<%	
		//百分率的数组
		double percent[] = (double[])request.getAttribute("AgePercent");
		//集合
		List<Count> list = (List<Count>)request.getAttribute("AgeList");
		//集合的大小即返回多少个数据
		int n = list.size();
		
	%>
		
	<%
		for(int i=0;i<n;i++){
	%>
		
		<tr>	 
				<td><%=list.get(i).getAge() %>岁</td>	
				<td><%=list.get(i).getPeople() %>人</td>		
		     	<td><%=percent[i]%>%</td>	   	
	    </tr>
	<%} %>
	
</table>	
	
</div>  
    
</div>
</body>
</html>     